package com.zhugy.comparecode.makefile;

import com.zhugy.comparecode.BaseCodeFile;
import com.zhugy.comparecode.CodeFile;
import com.zhugy.comparecode.CodeLine;
import com.zhugy.comparecode.CompareResult;
import com.zhugy.comparecode.config.CompareConfig;
import com.zhugy.comparecode.util.CommonUtils;

public class MakefileCodeFile extends BaseCodeFile {

	public MakefileCodeFile(String baseDir, String relativePath) {
		super(baseDir, relativePath);
	}

	@Override
	protected CodeLine parseLineWithContent(String content, int index) {
		return new MakefileCodeLine(index, content);
	}

	@Override
	protected boolean isBlankLine(String content) {
		if (CommonUtils.isEmpty(content)) {
			return true;
		}
		if (content.startsWith(";")) {
			return true;
		}
		return false;
	}

	@Override
	public CompareResult compareTo(CodeFile cf, CompareConfig config) {
		return CompareResult.success("");
	}

}
